#ifndef __DynLibManager_H__
#define __DynLibManager_H__
#include <singleton.h>
#include <string>
#include <map>

class CDynLib;
class CDynLibManager: public CSingleton<CDynLibManager>
{
    friend class CSingleton<CDynLibManager>;
protected:
    typedef std::map<std::string, CDynLib*> DynLibList;
    DynLibList m_LibList;
public:
    // Default constructor.
    CDynLibManager();

    // Default destructor.
    virtual ~CDynLibManager();

    // Loads the passed library.
    CDynLib* Load(const std::string & filename);

    // Unloads the passed library.
    void Unload(CDynLib* lib);
};

#endif
